1 using System;
2 using
System.Collections.Generic;
3 using
System.ComponentModel;
4 using
System.Drawing;
5 using
System.Data;
6 using
System.Linq;
7 using
System.Text;
8 using
System.Threading.Tasks;
9 using
System.Windows.Forms;
10
11 /*

12 namespace
SoftQuanLyNhaHang.Controllers
13 {
14     
class NhapKhoCtrl
15     {
16         // Method Add
17         
public static int InsertNhapKho(int _idNhapKho, string _maSanPham, string _tenSanPham, int _soLuong, int _donViTinhId, string _tenDonViTinh, string _giaNhap, string _ngaySanXuat, string _hanSuDung, string _hoVaTen, string _soDienThoai, string _diaChi, string _ghiChu, string _thanhTien, string _giaBanLe, string _giaBanBuon, DateTime _ngayTao)
18         {
19             
try
20             {
21                 Models.NhapKhoMod _nhapKho =
new Models.NhapKhoMod( _idNhapKho, _maSanPham, _tenSanPham, _soLuong, _donViTinhId, _tenDonViTinh, _giaNhap, _ngaySanXuat, _hanSuDung, _hoVaTen, _soDienThoai, _diaChi, _ghiChu, _thanhTien, _giaBanLe, _giaBanBuon, _ngayTao);
22                 
return _nhapKho.InsertNhapKho();
23             }
24             
catch
25             {
26                 
return 0;
27             }
28         }
29         
30         // Method Update
31         
public static int UpdateNhapKho(int _idNhapKho, string _maSanPham, string _tenSanPham, int _soLuong, int _donViTinhId, string _tenDonViTinh, string _giaNhap, string _ngaySanXuat, string _hanSuDung, string _hoVaTen, string _soDienThoai, string _diaChi, string _ghiChu, string _thanhTien, string _giaBanLe, string _giaBanBuon, DateTime _ngayTao)
32         {
33             
try
34             {
35                 Models.NhapKhoMod _nhapKho =
new Models.NhapKhoMod(_idNhapKho, _maSanPham, _tenSanPham, _soLuong, _donViTinhId, _tenDonViTinh, _giaNhap, _ngaySanXuat, _hanSuDung, _hoVaTen, _soDienThoai, _diaChi, _ghiChu, _thanhTien, _giaBanLe, _giaBanBuon, _ngayTao);
36                 
return _nhapKho.UpdateNhapKho();
37             }
38             
catch
39             {
40                 
return 0;
41             }
42
43         }
44         // Method Delete
45         
public static int DeleteNhapKho(int _idNhapKho)
46         {
47             
try
48             {
49                 Models.NhapKhoMod _nhapKho =
new Models.NhapKhoMod(_idNhapKho);
50                 
return _nhapKho.DeleteNhapKho();
51             }
52             
catch
53             {
54                 
return 0;
55             }
56         }
57
58
59
60         
public static DataSet FillDataSet_NhapKhoGetByMaSanPham(string _maSanPham)
61         {
62             
try
63             {
64                 Models.NhapKhoMod nhapKho =
new Models.NhapKhoMod(_maSanPham);
65                 
return nhapKho.FillDataSet_getNhapKhoByMaSanPham();
66
67             }
68             
catch
69             {
70                 
return null;
71             }
72         }
73
74
75         
public static DataSet FillDataSet_getSearchByMaSanPham(string _maSanPham, int _idKhachHang)
76         {
77             
try
78             {
79                 Models.NhapKhoMod sp =
new Models.NhapKhoMod(_maSanPham, _idKhachHang);
80                 
return sp.FillDataSet_getSearchByMaSanPham();
81
82             }
83             
catch
84             {
85                 
return null;
86             }
87         }
88
89         
public static DataSet FillDataSet_getNhapKhoBySoDienThoai(string _maSanPham, string _soDienThoai)
90         {
91             
try
92             {
93                 Models.NhapKhoMod nhapkho =
new Models.NhapKhoMod(_maSanPham, _soDienThoai);
94                 
return nhapkho.FillDataSet_getNhapKhoBySoDienThoai();
95             }
96             
catch
97             {
98                 
return null;
99             }
100         }
101
102
103         
public static DataSet FillDataSet_tbl_NhapKho_Search(int _pageSize, int _pageIndex)
104         {
105             
try
106             {
107                 Models.NhapKhoMod nhapkho =
new Models.NhapKhoMod(_pageSize, _pageIndex);
108                 
return nhapkho.FillDataSet_tbl_NhapKho_Search();
109
110             }
111             
catch
112             {
113                 
return null;
114             }
115         }
116
117     }
118 }
119
120 */


Gõ tìm kiếm nhanh...